import { createRouter, createWebHistory } from "vue-router";

import { routes } from "./routes";

const router = createRouter({
  history: createWebHistory(), // history模式
  routes: routes,
});

// 全局路由守卫
router.beforeEach((to, from, next) => {
  next();
});

export default router;
